package com.it.glide.glidesample;

import android.content.Context;

import com.bumptech.glide.load.data.DataFetcher;
import com.bumptech.glide.load.model.GenericLoaderFactory;
import com.bumptech.glide.load.model.ModelLoader;
import com.bumptech.glide.load.model.ModelLoaderFactory;

import java.io.InputStream;


public class WebServiceGlideUrlLoader implements ModelLoader<WebServiceGlideUrl, InputStream> {

    @Override
    public DataFetcher<InputStream> getResourceFetcher(WebServiceGlideUrl model, int width, int height) {
        return new WebServiceFetcher(model);
    }

    public static class Factory implements ModelLoaderFactory<WebServiceGlideUrl, InputStream> {


        @Override
        public ModelLoader<WebServiceGlideUrl, InputStream> build(Context context, GenericLoaderFactory factories) {
            return new WebServiceGlideUrlLoader();
        }

        @Override
        public void teardown() {

        }
    }




}